/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.game.math.view.domain;

import javax.swing.DefaultComboBoxModel;
import org.game.math.view.config.Configure;

/**
 *
 * @author nmduc
 */
class NumOperatorComboBoxModel(x:Array[java.lang.Object]) extends DefaultComboBoxModel(x) {
  def this() = {
    this(Array("1","2","3","4","5","6","7","8","9","10"));
    this.setSelectedItem(Configure.getInstance().getTempProperties().getProperty(Configure.NUM_OPERATOR));
  }

  override def setSelectedItem(anObject:Any):Unit = {
    super.setSelectedItem(anObject);
    Configure.getInstance().getTempProperties().setProperty(Configure.NUM_OPERATOR,  anObject.asInstanceOf[String]);
  }
}
